package com.dy.sucetity.constant;

/**
 * @ClassName:
 * @Author: dingyu
 * @Desctiption: (描述) 异常枚举
 * @Date: 2022/3/31 9:58
 * @Version 1.0 (版本)
 */
public enum ResultCodeEnum {
    SUCCESS(20000, "成功"),
    METHOD_NOT_SUPPORT(2999, "方法不被支持"),
    UNKNOWN_ERROR(20001, "未知错误"),
    PARAM_ERROR(20002, "参数错误"),
    NULL_POINT(20003, "空指针异常"),
    ENTITY_EXIST(20004, "实体已存在"),
    ENTITY_NOT_EXIST(20005, "实体不存在"),
    HTTP_CLIENT_ERROR(20006, "客户端连接异常"),
    ID_NOT_EXIST(20007, "记录ID不能为空"),
    CREATE_FAIL(20008, "新增失败"),
    UPDATE_FAIL(20009, "修改失败"),
    DELETE_FAIL(20010, "删除失败");

    private Integer code;
    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }
}
